import {YearMonth} from "@js-joda/core";
import fetcher from "./Fetcher";

export interface ProcurementPurchasePriceGroupByYearMonthRequest{
    startYearMonth?:YearMonth
    endYearMonth?:YearMonth
}

export function getProcurementSupplierFeeDetailGroupByMonth(supplierId:number, request:ProcurementPurchasePriceGroupByYearMonthRequest = {}){
    return fetcher.get<ProcurementSupplierFeeDetailGroupByMonthResponse>(`procurementSuppliers/${supplierId}/statistics/feeDetailGroupByMonth`,request)
}

export interface ProcurementSupplierFeeDetailGroupByMonthResponse {
    data:{
        statisticYearMonth:YearMonth,
        procurementFee?:number
        returnFee?:number
    }[]
}